﻿body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #111;
    color: white;
}

header {
    background-color: #c00000;
    padding: 30px;
    text-align: center;
}

    header h1 {
        margin: 0;
        font-size: 40px;
    }

nav {
    background-color: #000;
    text-align: center;
    padding: 12px;
   
}

    nav a {
        color: white;
        margin: 0 20px;
        text-decoration: none;
        font-size: 18px;
        font-weight: bold;
    }

        nav a:hover {
            color: #ffcc00;
        }

.banner {
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 100%;                       
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.banner h1 {
    color: white;
    font-size: 50px;
    z-index: 1;
}


    .banner h2 {
        background-color: rgba(0,0,0,0.6);
        padding: 20px 40px;
        font-size: 36px;
        border-radius: 10px;
    }

.content {
    padding: 40px;
    text-align: center;
}

    .content h2 {
        color: #ffcc00;
    }

.cars {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.car {
    background-color: #222;
    padding: 15px;
    width: 250px;
    border-radius: 10px;
}

    .car img {
        width: 100%;
        border-radius: 10px;
    }

footer {
    background-color: #000;
    text-align: center;
    padding: 15px;
    margin-top: 40px;
    font-size: 14px;
}
body {
    background-color: #0b0b0b;
}

.card {
    border-radius: 15px;
    transition: 0.3s;
}

    .card:hover {
        transform: scale(1.05);
    }
.car-card {
    background: #1b1b1b;
    padding: 15px;
    width: 260px;
    border-radius: 15px;
    text-align: center;
    transition: 0.4s;
    transform-style: preserve-3d;
}

    .car-card img {
        width: 100%;
        border-radius: 10px;
    }

    .car-card:hover {
        transform: scale(1.07);
        box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    }

    .car-card a {
        text-decoration: none;
        color: white;
        display: block;
    }



.search-box {
    margin: 40px;
    text-align: center;
}

    .search-box input {
        padding: 10px;
        width: 250px;
        border-radius: 5px;
        border: none;
    }

    .search-box button {
        padding: 10px 20px;
        background: #c00000;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }

        .search-box button:hover {
            background: #ffcc00;
            color: black;
        }

.cars {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.car-card {
    width: 30%;
}

.dropdown-menu {
    background: #333;
    border: none;
    z-index: 9999;
}

.dropdown-item {
    color: white;
}

    .dropdown-item:hover {
        background: #e10600;
        color: white;
    }
.chat-bubble-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 60px;
    height: 60px;
    background: var(--rosso);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(227,36,0,0.45);
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 0; /* Ghi đè padding nếu có */
}

    .chat-bubble-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 8px 36px rgba(227,36,0,0.6);
    }

    .chat-bubble-btn.open {
        transform: scale(1);
    }

.bubble-icon {
    transition: all 0.3s;
}

.bubble-icon-close {
    display: none;
}

.chat-bubble-btn.open .bubble-icon-open {
    display: none;
}

.chat-bubble-btn.open .bubble-icon-close {
    display: block;
}

/* Ping ring */
.chat-bubble-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(227,36,0,0.4);
    animation: ping-ring 2.5s ease-out infinite;
}

@keyframes ping-ring {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Notification dot */
.chat-notif {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid var(--rosso);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: var(--rosso);
    font-family: 'Space Mono', monospace;
}

/* Chat window */
.chatbox {
    position: fixed;
    bottom: 108px;
    right: 32px;
    width: 360px;
    height: 520px;
    background: var(--nero-2);
    border: 1px solid #242424;
    border-top: 3px solid var(--rosso);
    display: flex;
    flex-direction: column;
    z-index: 800;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(227,36,0,0.1);
    transform-origin: bottom right;
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.28s cubic-bezier(0.34,1.56,0.64,1);
    text-align: left; /* Đặt lại text-align để chống kế thừa từ body/auth-box */
}

    .chatbox.open {
        transform: scale(1) translateY(0);
        opacity: 1;
        pointer-events: all;
    }

/* Chat header */
.cb-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #1e1e1e;
    flex-shrink: 0;
}

.cb-avatar {
    width: 38px;
    height: 38px;
    background: var(--rosso);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.cb-info {
    flex: 1;
}

.cb-name {
    font-family: 'Bebas Neue', cursive;
    font-size: 17px;
    letter-spacing: 2px;
    color: var(--bianco);
    line-height: 1;
    margin: 0; /* Reset margin nếu có */
}

.cb-status {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    color: #4CAF50;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .cb-status::before {
        content: '';
        width: 6px;
        height: 6px;
        background: #4CAF50;
        border-radius: 50%;
        box-shadow: 0 0 5px #4CAF50;
        animation: blink-dot 2s ease infinite;
    }

@keyframes blink-dot {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.cb-powered {
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    color: var(--grigio-light);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gemini-badge {
    background: linear-gradient(135deg, #4285f4, #34a853, #fbbc04, #ea4335);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Chat messages */
.cb-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0d0d0d;
    scroll-behavior: smooth;
}

    .cb-body::-webkit-scrollbar {
        width: 3px;
    }

    .cb-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .cb-body::-webkit-scrollbar-thumb {
        background: var(--rosso-dark);
        border-radius: 2px;
    }

.cb-msg-row {
    display: flex;
    gap: 8px;
    animation: msg-pop 0.25s ease;
}

@keyframes msg-pop {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cb-msg-row.user {
    flex-direction: row-reverse;
}

.cb-msg-av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-top: 2px;
}

    .cb-msg-av.ai {
        background: var(--rosso);
        clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
        border-radius: 0;
    }

    .cb-msg-av.user {
        background: var(--nero-4);
        border: 1px solid var(--grigio);
    }

.cb-bubble {
    max-width: 80%;
    padding: 10px 14px;
    font-size: 13.5px;
    line-height: 1.6;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
}

    .cb-bubble.ai {
        background: var(--nero-3);
        border: 1px solid #222;
        color: var(--bianco);
        border-radius: 2px 10px 10px 10px;
    }

    .cb-bubble.user {
        background: var(--rosso);
        color: white;
        border-radius: 10px 2px 10px 10px;
        font-family: 'Cormorant Garamond', serif;
    }

/* Quick chips */
.quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.quick-chip {
    background: transparent;
    border: 1px solid #2a2a2a;
    color: var(--grigio-light);
    padding: 5px 10px;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    border-radius: 4px; /* Fix nếu bị ảnh hưởng global */
}

    .quick-chip:hover {
        border-color: var(--rosso);
        color: var(--rosso);
        background: rgba(227,36,0,0.05);
    }

/* Typing */
.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 14px;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--rosso);
    border-radius: 50%;
    animation: bounce-dot 1.1s ease infinite;
}

    .dot:nth-child(2) {
        animation-delay: 0.18s;
    }

    .dot:nth-child(3) {
        animation-delay: 0.36s;
    }

@keyframes bounce-dot {
    0%, 60%, 100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-7px);
    }
}

/* Chat footer */
.cb-footer {
    padding: 12px;
    border-top: 1px solid #1e1e1e;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
}

#cb-input {
    flex: 1;
    background: #0d0d0d;
    border: 1px solid var(--grigio);
    color: var(--bianco);
    padding: 10px 14px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    outline: none;
    resize: none;
    min-height: 40px;
    max-height: 90px;
    transition: border-color 0.2s;
    border-radius: 0;
}

    #cb-input:focus {
        border-color: var(--rosso);
    }

    #cb-input::placeholder {
        color: var(--grigio);
        font-style: italic;
    }

#cb-send {
    background: var(--rosso);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 16px;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    border-radius: 0; /* Khắc phục xung đột auth-box */
    padding: 0;
}

    #cb-send:hover {
        background: var(--rosso-dark);
        transform: translateY(-1px);
    }

    #cb-send:disabled {
        background: var(--grigio);
        cursor: not-allowed;
        transform: none;
    }

.cb-note {
    padding: 6px 12px;
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    letter-spacing: 1px;
    color: var(--grigio);
    text-align: center;
    border-top: 1px solid #141414;
    flex-shrink: 0;
}
/* --- BIẾN MÀU FERRARI (Thêm vào đầu file CSS) --- */
:root {
    --rosso: #e32400;
    --rosso-dark: #b31d00;
    --nero-2: #111111;
    --nero-3: #1a1a1a;
    --nero-4: #222222;
    --bianco: #ffffff;
    --grigio: #444444;
    --grigio-light: #888888;
}

/* --- TOÀN BỘ CSS CHATBOX CỦA BẠN (Đã được tối ưu) --- */

.chat-bubble-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 60px;
    height: 60px;
    background: var(--rosso);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(227,36,0,0.45);
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 0;
}

    .chat-bubble-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 8px 36px rgba(227,36,0,0.6);
    }

    .chat-bubble-btn.open .bubble-icon-open {
        display: none;
    }

    .chat-bubble-btn.open .bubble-icon-close {
        display: block;
    }

.bubble-icon-close {
    display: none;
}

/* Hiệu ứng vòng tròn lan tỏa quanh nút */
.chat-bubble-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(227,36,0,0.4);
    animation: ping-ring 2.5s ease-out infinite;
}

@keyframes ping-ring {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.chat-notif {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid var(--rosso);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--rosso);
}

.chatbox {
    position: fixed;
    bottom: 108px;
    right: 32px;
    width: 360px;
    height: 520px;
    background: var(--nero-2);
    border: 1px solid #242424;
    border-top: 3px solid var(--rosso);
    display: flex;
    flex-direction: column;
    z-index: 800;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    transform-origin: bottom right;
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.28s cubic-bezier(0.34,1.56,0.64,1);
}

    .chatbox.open {
        transform: scale(1) translateY(0);
        opacity: 1;
        pointer-events: all;
    }

.cb-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    border-bottom: 1px solid #222;
}

.cb-avatar {
    width: 38px;
    height: 38px;
    background: var(--rosso);
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.cb-name {
    font-size: 16px;
    color: white;
    margin: 0;
    letter-spacing: 1px;
}

.cb-status {
    font-size: 10px;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .cb-status::before {
        content: '';
        width: 6px;
        height: 6px;
        background: #4CAF50;
        border-radius: 50%;
        box-shadow: 0 0 5px #4CAF50;
    }

.gemini-badge {
    font-size: 10px;
    background: linear-gradient(135deg, #4285f4, #34a853, #fbbc04, #ea4335);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.cb-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #0d0d0d;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb-bubble {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 2px 12px 12px 12px;
    background: #222;
    color: #ddd;
}

.quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.quick-chip {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 5px 10px;
    font-size: 10px;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
}

    .quick-chip:hover {
        border-color: var(--rosso);
        color: var(--rosso);
    }

.cb-footer {
    padding: 12px;
    display: flex;
    gap: 8px;
    background: #111;
    border-top: 1px solid #222;
}

#cb-input {
    flex: 1;
    background: #000;
    border: 1px solid #333;
    color: white;
    padding: 10px;
    border-radius: 4px;
    outline: none;
    font-size: 14px;
    resize: none;
}

    #cb-input:focus {
        border-color: var(--rosso);
    }

#cb-send {
    background: var(--rosso);
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
}

.cb-note {
    font-size: 9px;
    color: #444;
    text-align: center;
    padding: 5px;
}
